
// 是否存在数组里
export const inArray = (search: any, array: any) => {
    for (var i in array) {
        if (array[i] == search) {
            return true;
        }
    }
    return false;
}
export const toArray = (obj:any) => {
  var arr = [];
  for (let i in obj) {
    if (obj[i] != null && obj[i] != undefined) arr.push(obj[i])
  };
  return arr;
}

export default {
    inArray,
    toArray
}